package org.example;

import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@Builder(toBuilder = true)
public class Teacher {
    private String name;

    public Teacher(@NotNull String name) {
        this.name = name;
    }


    public void teach(@NotBlank String content) {
        System.out.println(content);
    }

    public @Size(min = 5, max = 10) String getTeacherName(String name) {
        return name;
    }
}
